package com.fsm.template.controller;

import com.fsm.common.tools.Result.Result;
import com.fsm.template.dto.TableDto;
import com.fsm.template.service.CreateTemplateService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@Tag(name = "组件生成控制器")
@RequestMapping("/createTemplate")
public class CreateTemplateController {

    @Autowired
    private CreateTemplateService createTemplateService;

    /**
     * 生成模版接口
     *
     * @param
     * @return
     */
    @PostMapping("createVue")
    @Operation(summary="生成模版接口",description="生成模版接口")
    public Result createVue(@RequestBody TableDto tableDto) throws Exception{
        return createTemplateService.createVue(tableDto);
    }
}
